!pH

a RISC OS application for Chemistry

By Chris Johnson

icon.gif - 1175 bytes

pH is a simple little application to display pH curves for the titration of mono-, di-, and tri-protic acids against a strong base. The dissociation constant(s), concentration, and volumes to be used are entered, and then the graph may be plotted.

This help file is divided into the following sections.

  • The Iconbar
  • The Iconbar Menu
  • Setting The Initial Conditions
  • The Graph
  • The Graph Menu

The Iconbar

Double clicking on the pH application in a filer window installs the pH icon on the iconbar.

Clicking SELECT on the iconbar will open the starting condition input window.

The Iconbar Menu

ibmenu.png - 3847 bytes

Info

Sliding right off this option opens the standard application information window.

Help...

Opens the HTML manual (which you are currently reading) in a browser.

Choices...

This dialogue is where all the application defaults are set. At the foot of the dialogue are the three buttons Save, Cancel, and Set.
prefs1.png - 4065 bytes
  • Set will apply the choices with immediate effect. Any changes made will last only until !pH is quit.
  • Save will apply the choices with immediate effect, and will also save the settings so they will be reloaded when !pH is run on another occasion.
  • Cancel will simply close the dialogue, and any alterations made will be ignored.

In the main part of the dialogue you can set some default actions of !pH.

Font style
prefs2.png - 7Kb
The font style and the font size of the font used to label and annotate the graph can be set up here.
Line style
prefs3.png - 7Kb
The style attributes for the line on the graph are set here. The number of line segments determines how smooth the curve of the line appears to be (it is made up of a number of straight line segments). The number of segments can be changed using the bump arrows in the range 50 - 200 segments.

The colour of the line, and the colour of the rectangle used to mark the pH range of some common indicators can be changed. The menu button to the right of each colour patch will raise a standard colour menu.

MultiPlot export
prefs4.png - 8Kb
If you wish to use a high quality copy of the graph in a document for example, the data can be transferred to !MultiPlot. This allows a high quality print out, or exporting as a draw file.

The data can be exported to !MultiPlot either as a set of points, or as a continuous line. When exporting, a new graph will be produced if the Clear MultiPlot window button is ticked. If it is not ticked, then the data will be added to the current graph being displayed in MultiPlot. This enables several pH curves to be included in the same graph.

Quit

This closes the application, removing the application icon from the iconbar.

Setting The Initial Conditions

input.png - 144KbClicking SELECT on the iconbar icon opens the the dialogue which allows you to specify the initial conditions for the 'titration'. This dialogue is shown at the right.

All the parameters required to simulate the titration are entered in this window.

Acid parameters

The name of the acid can be entered in the writable field. You must then select whether this is a mono-, di-, or tri-protic acid. This action will fade and unfade the pK icons as appropriate. The pK writable icons are used to enter the acid dissociation constants for the acid. The dissociation constant values are entered as the pKa values. Remember that this is given by

pKa = - log10(Ka)

Thus, if a dissociation constant is 2.5 × 10-5, the pKa is 4.60.

The volume of acid used and the strength or molarity of the acid is also required.

Base parameters

The three values required here correspond to the molarity or strength of the base, the initial volume (it is not necessary to start at zero if you wish to expand a portion of the resulting curve), and the end volume.

Preset examples

To the right of the acid name field is a menu button. The menu provided has three options, viz. mono-, di-, and triprotic, which lead to submenus, each containing a list of appropriate acids. Selecting one of these will enter the acids pK values, and a complete set of data to allow a graph of the full titration to be plotted immediately. The preset examples are currently 'hardwired' into the application, but should cover a wide variety of typical acids.

Clicking on the Plot button will result in the titration graph being plotted.

The Graph

The graph shows the titration curve over the range as set in the initial conditions window.
graph.png - 14Kb

The Graph Menu

grmenu.png - 18KbThe graph menu options are as follows.

Indicators

This leads to a submenu giving a listing of common acid-base titration indicators. Clicking on one of these will place on the titration curve graph a shaded rectangle showing the region over which the indicator will change from one colour to the other. A heading will also be placed on the graph giving the indicator name and the pH range over which it will change colour.

There is a final choice, 'no indicator', which will remove the indicator representation from the graph.

To MultiPlot

This allows the graph data to be sent and displayed immediately in MultiPlot, which will allow much more customisation of the appearance of the graph, perhaps for presentation purposes. If MultiPlot is not running when this option is selected, a warning will be displayed so that MultiPlot can be launched.

Save as

This leads to two alternatives
  • Save as MultiPlot will save a file in MultiPlot format, which can be subsequently loaded into MultiPlot.
  • Save as CSV will save a text file in CSV format. As well as the data, the initial condition parameters will be included in the CSV file.

New graph

This will simply reopen the initial conditions dialogue (if it has been closed) to allow a new graph to be plotted.

Help...

Opens the HTML manual (which you are currently reading) in a browser. Function key F1 will also open up the HTML help manual.

Feedback

pH is under active development. If you have any problems, then please let the author know - problems not reported cannot be investigated. In addition, if you have any comments or suggestions, then let the author know.

Finally, if you find this software useful, an e-mail to the author (chris@chris-johnson.org.uk) telling him so will be a source of encouragement to continue to develop software for RISC OS.

This page last modified at 16:44 pm on 19th May 2011
pH is © Chris Johnson (2006)